/*
- Read and write Bushnellfiles.
+ Read and write Bushnell files.
Copyright (C) 2008, 2009 Robert Lipe (robertlipe@gpsbabel.org)
static void
wr_init(const char *fname) {
+ int i,l = strlen(fname);
+ char obuf[20] = { 0 } ;
+ char *p = obuf;
file_out = gbfopen_le(fname, "w", MYNAME);
trkpt_count = 0;
- static char obuf[20] = {"TL003"};
+ for (i = 0; (i < l) && (i < 20); i++) {
+ char c = toupper(fname[i]);
+ if (isalnum(c))
+ *p++ = c;
+ if (c == '.')
+ break;
+ }
gbfwrite(&obuf, 1, 20, file_out);
}
waypoint be in a separate file. Our "output filename" argument, -F is
modified to take an "output filename template". The output filename
you specify will have a dash, and a sequentially increasing integer,
-and the ".wpt" extension appended to it.
+and the ".wpt" extension appended to it. When the names are shown on
+the GPS itself, the shortnames from the source format are used and not these
+"made up" names.
</para>
<example id="bushnell-output">
<title>Command showing writing to Bushnell files</title>
<para>
Consider the case where 'whatever.gpx' holds three waypoints.
<userinput>
- gpsbabel -i gpx -f whatever.gpx -o bushnell -F /Volumes/Bushnell/whatever
+ gpsbabel -i gpx -f whatever.gpx -o bushnell -F /Volumes/Bushnell/WAYPOINT/whatever
</userinput>
will result in "whatever-0.wpt", "whatever-1.wpt", and "whatever-2.wpt" being
credated in that directory.
+Windows users may prefer the spelling:
+<userinput>
+ gpsbabel -i gpx -f whatever.gpx -o bushnell -F e:/WAYPOINT/whatever
+</userinput>
+</para>
+
+<para>
+At least for the 200CR, the directory name used by the device is "WAYPOINT"
+in the root directory. It's also worth mentioning that its USB Mass Storage
+protocol appears to not work on (at least) Snow Leopard 10.6.2. It's not
+known if other Onix models have a more compatible USB implementation.
</para>
+
+
</example>
</para>
<para>
This format reads individual .trl files as written by the GPS. As this is
-a reverse-engineered format, it's not understood how long tracks, in
+a reverse-engineered format, it's not understood how (or even if) long
+tracks, in
particular, span multiple files so initially this format is most effective
on tracks under a few thousand points.
</para>
When writing tracks, a maximum of 4502 points is supported as this is the
most we believe these units can represent in a track.
</para>
+<para>
+ The output base filename, converted to uppercase and stripped of
+ everything but letters and digits, is used for the trail name inside
+ the file itself.
+</para>